screen _newimage(20, 40, 0)

GOSUB DisplayStuff
for y = 0 to 39
 scroll (todo, todo) - (todo, todo), 0, -1
 _delay 0.5
next y
_delay 1

GOSUB DisplayStuff
for y = 0 to 39
 scroll (todo, todo) - (todo, todo), 0, +1
 _delay 0.5
next y

end

DisplayStuff:

for y = 0 to 39
 line (0,y) - (19,y), y mod 14 + 1
next y
_delay 1

RETURN